# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=pcc-libs
pkgver=20220619
pkgrel=0
pkgdesc="The portable C compiler support libraries."
url="http://pcc.ludd.ltu.se/"
arch="x86 x86_64"
license="BSD"
subpackages="$pkgname-dev"
source="ftp://pcc.ludd.ltu.se/pub/pcc-libs/pcc-libs-$pkgver.tgz
	musl-fixes.patch"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1e4de973cdf0dfcad2ec43d072de5249c58ef3d3f5d9c3d23373d8f013f6ef6f72f3d27501bfd8514c106fda3ef80659070f79206efbbd2615f89b659c341279  pcc-libs-20220619.tgz
fd8c71cd583c6be29553f2b7e6ce66073afd6d0406ae86f6fbb6a36efe8685be4732d2989180a9b31af734cc9a0973c1c731472f02bad076121f6c3c58391fc4  musl-fixes.patch
"
